import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '姓名',
    dataIndex: 'name'
   },
   {
    title: '生日',
    dataIndex: 'birthday'
   },
   {
    title: '昵称',
    dataIndex: 'nickname'
   },
   {
    title: '身高',
    dataIndex: 'height'
   },
   {
    title: '体重',
    dataIndex: 'weight'
   },
   {
    title: '现居住地',
    dataIndex: 'currentResidence'
   },
   {
    title: '婚姻状况',
    dataIndex: 'maritalStatus'
   },
   {
    title: '家乡',
    dataIndex: 'hometown'
   },
   {
    title: '微信号',
    dataIndex: 'wechat'
   },
   {
    title: '学历',
    dataIndex: 'education'
   },
   {
    title: '学校',
    dataIndex: 'university'
   },
   {
    title: '工作',
    dataIndex: 'job'
   },
   {
    title: '公司',
    dataIndex: 'company'
   },
   {
    title: '薪水',
    dataIndex: 'salary'
   },
   {
    title: '自我描述',
    dataIndex: 'selfDescription'
   },
   {
    title: '家庭描述',
    dataIndex: 'familyDescription'
   },
   {
    title: '兴趣爱好',
    dataIndex: 'hobbies'
   },
   {
    title: '大字段',
    dataIndex: 'extData'
   },
   {
    title: 'addTime',
    dataIndex: 'addTime'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '姓名',
    field: 'name',
    component: 'Input'
  },
 {
    label: '生日',
    field: 'birthday',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '姓名',
    field: 'name',
    component: 'Input',
  },
  {
    label: '生日',
    field: 'birthday',
    component: 'Input',
  },
  {
    label: '昵称',
    field: 'nickname',
    component: 'Input',
  },
  {
    label: '身高',
    field: 'height',
    component: 'Input',
  },
  {
    label: '体重',
    field: 'weight',
    component: 'Input',
  },
  {
    label: '现居住地',
    field: 'currentResidence',
    component: 'Input',
  },
  {
    label: '婚姻状况',
    field: 'maritalStatus',
    component: 'Input',
  },
  {
    label: '家乡',
    field: 'hometown',
    component: 'Input',
  },
  {
    label: '微信号',
    field: 'wechat',
    component: 'Input',
  },
  {
    label: '学历',
    field: 'education',
    component: 'Input',
  },
  {
    label: '学校',
    field: 'university',
    component: 'Input',
  },
  {
    label: '工作',
    field: 'job',
    component: 'Input',
  },
  {
    label: '公司',
    field: 'company',
    component: 'Input',
  },
  {
    label: '薪水',
    field: 'salary',
    component: 'Input',
  },
  {
    label: '自我描述',
    field: 'selfDescription',
    component: 'Input',
  },
  {
    label: '家庭描述',
    field: 'familyDescription',
    component: 'Input',
  },
  {
    label: '兴趣爱好',
    field: 'hobbies',
    component: 'Input',
  },
  {
    label: '大字段',
    field: 'extData',
    component: 'Input',
  },
  {
    label: 'addTime',
    field: 'addTime',
    component: 'DatePicker',
    componentProps: {
      showTime: true,
      valueFormat: 'YYYY-MM-DD hh:mm:ss',
    },
  },
];
